package com.dexgdx.game.structure.base;

import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.dexgdx.game.util.ObjectIdentification;

public class BaseObject extends BaseRegion implements Comparable<BaseObject>{
	
	private static final long serialVersionUID = 7222567625350253896L;

	protected ObjectIdentification objectId;

	protected Long objectIndex;
	
	protected TextureRegion imageTextureRegion;
	protected BaseRegion imageBaseRegion;
	protected boolean animated;
	
	public BaseObject(float x, float y, float height, float width, boolean solidObject, boolean animated, ObjectIdentification objectId) {
		super(x, y, height, width);
		this.solidObject = solidObject;
		this.objectId = objectId;
		this.animated = animated;
	}
	
	public Long getObjectIndex() {
		return objectIndex;
	}
	
	public void setObjectIndex(Long actorIndex) {
		if(this.objectIndex == null)
			this.objectIndex = actorIndex;
	}

	@Override
	public int compareTo(BaseObject baseObject) {
		return Integer.valueOf((int)y).compareTo(Integer.valueOf((int)baseObject.y));
	}
	
	public ObjectIdentification getPlayerNameId() {
		return objectId;
	}

	public boolean isAnimated() {
		return animated;
	}
	
	
	public TextureRegion getImageTextureRegion() {
		return imageTextureRegion;
	}

	public BaseRegion getImageBaseRegion() {
		return imageBaseRegion;
	}

	public void loadImageTextureRegionAndFrame(int animIndex){}
	
}
